package com.shqcjd.yunweiyanoperator.api;

import com.lzy.okgo.OkGo;
import com.lzy.okrx2.adapter.ObservableBody;
import com.shqcjd.yunweiyanoperator.helper.JsonConvert;
import com.shqcjd.yunweiyanoperator.model.DefectInfoBean;
import com.shqcjd.yunweiyanoperator.model.ResponseData;
import com.shqcjd.yunweiyanoperator.model.pojo.AllTaskBean;
import com.shqcjd.yunweiyanoperator.model.pojo.AppOperationGuideMode;
import com.shqcjd.yunweiyanoperator.model.pojo.ChannelUser;
import com.shqcjd.yunweiyanoperator.model.pojo.AbnormalBean;
import com.shqcjd.yunweiyanoperator.model.pojo.CollectionBean;
import com.shqcjd.yunweiyanoperator.model.pojo.CompanyBean;
import com.shqcjd.yunweiyanoperator.model.pojo.CompanyRegisterBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ContactsBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ContactsNewsBean;
import com.shqcjd.yunweiyanoperator.model.pojo.DefectManageBean;
import com.shqcjd.yunweiyanoperator.model.pojo.DefectManageTypeBean;
import com.shqcjd.yunweiyanoperator.model.pojo.DepartmentBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentAbnormalBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentGroupBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentInfoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentInfoInspectBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentInspectionBean;
import com.shqcjd.yunweiyanoperator.model.pojo.EquipmentListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ExpertBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ExpertDetailBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ExpertListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ExpertReplyDetailBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ExpertReplyListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.FileBean;
import com.shqcjd.yunweiyanoperator.model.pojo.FollowListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.GuideListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.IndexBean;
import com.shqcjd.yunweiyanoperator.model.pojo.InspectionRecordBean;
import com.shqcjd.yunweiyanoperator.model.pojo.InspectionStandardBean;
import com.shqcjd.yunweiyanoperator.model.pojo.InspectionListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.InspectionTaskBean;
import com.shqcjd.yunweiyanoperator.model.pojo.IntentEquipmentBean;
import com.shqcjd.yunweiyanoperator.model.pojo.KnowledgeBean;
import com.shqcjd.yunweiyanoperator.model.pojo.KnowledgeInfoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.LoginBean;
import com.shqcjd.yunweiyanoperator.model.pojo.MajorBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ManageDynamicDataDictionary;
import com.shqcjd.yunweiyanoperator.model.pojo.MoreImgListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.MsgBean;
import com.shqcjd.yunweiyanoperator.model.pojo.MyVideoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.NormalUserBean;
import com.shqcjd.yunweiyanoperator.model.pojo.PlayBackBean;
import com.shqcjd.yunweiyanoperator.model.pojo.PointInfoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ProblemDetailBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ProblemFeedbackListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ProblemListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ProblemType;
import com.shqcjd.yunweiyanoperator.model.pojo.ProcessBackBean;
import com.shqcjd.yunweiyanoperator.model.pojo.NewsDetailBean;
import com.shqcjd.yunweiyanoperator.model.pojo.NewsListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.RepairRecordBean;
import com.shqcjd.yunweiyanoperator.model.pojo.RouteInfoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.RouteInfoListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.RouteListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.RouteQueryBean;
import com.shqcjd.yunweiyanoperator.model.pojo.SendRecordBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ShareBean;
import com.shqcjd.yunweiyanoperator.model.pojo.ShareVideoBean;
import com.shqcjd.yunweiyanoperator.model.pojo.SolvedProblemBean;
import com.shqcjd.yunweiyanoperator.model.pojo.SquareListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.StaffManageBean;
import com.shqcjd.yunweiyanoperator.model.pojo.StateInspectionRecordBean;
import com.shqcjd.yunweiyanoperator.model.pojo.TaskCodeBean;
import com.shqcjd.yunweiyanoperator.model.pojo.UploadFileRet;
import com.shqcjd.yunweiyanoperator.model.pojo.TreeNode;
import com.shqcjd.yunweiyanoperator.model.pojo.UserControlBean;
import com.shqcjd.yunweiyanoperator.model.pojo.VideoCategory;
import com.shqcjd.yunweiyanoperator.model.pojo.VideoListBean;
import com.shqcjd.yunweiyanoperator.model.pojo.VideotapeBean;

import org.json.JSONObject;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;

/**
 * Created by sy on 2019/3/14.
 */

public class ApiService {

    public static Observable<ResponseData<IndexBean>> index(){
        return OkGo.<ResponseData<IndexBean>>get(HttpUrl.INDEX_DATA)
                .converter(new JsonConvert<ResponseData<IndexBean>>(){})
                .adapt(new ObservableBody<ResponseData<IndexBean>>());
    }

    public static Observable<ResponseData> createGuide(JSONObject jsonObject) {
        return OkGo.<ResponseData>post(HttpUrl.CREATE_GUIDE)
                .upJson(jsonObject)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<FileBean>> uploadFile(File file) {
        return OkGo.<ResponseData<FileBean>>post(HttpUrl.UPLOAD_FILE)
                .params("file", file)
                .converter(new JsonConvert<ResponseData<FileBean>>(){})
                .adapt(new ObservableBody<ResponseData<FileBean>>());
    }

    public static Observable<ResponseData> sendFile(JSONObject jsonObject) {
        return OkGo.<ResponseData>post(HttpUrl.SEND_FILE)
                .upJson(jsonObject)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<List<FileBean>>> getFileList(String json) {
        return OkGo.<ResponseData<List<FileBean>>>post(HttpUrl.GET_FILE_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<List<FileBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<FileBean>>>());
    }

    public static Observable<ResponseData<List<FileBean>>> getGuideFileList(String json) {
        return OkGo.<ResponseData<List<FileBean>>>post(HttpUrl.GUIDE_FILE_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<List<FileBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<FileBean>>>());
    }

    public static Observable<ResponseData> handleGuide(JSONObject jsonObject) {
        return OkGo.<ResponseData>post(HttpUrl.HANDLE_GUIDE)
                .upJson(jsonObject)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<String>> word2pf(String json) {
        return OkGo.<ResponseData<String>>post(HttpUrl.WORD_2_PDF)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<String>>(){})
                .adapt(new ObservableBody<ResponseData<String>>());
    }


    public static Observable<ResponseData<MsgBean>> getMsgList(String json) {
        return OkGo.<ResponseData<MsgBean>>post(HttpUrl.MSG_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<MsgBean>>(){})
                .adapt(new ObservableBody<ResponseData<MsgBean>>());
    }


    public static Observable<ResponseData> expertSendMsg(String jsonObject) {
        return OkGo.<ResponseData>post(HttpUrl.EXPERT_SEND_MSG)
                .upJson(jsonObject)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }


    public static Observable<ResponseData<ChannelUser>> queryChannelUser(String roomId) {
        return OkGo.<ResponseData<ChannelUser>>get(HttpUrl.QUERY_CHANNEL_USER+roomId)
                .converter(new JsonConvert<ResponseData<ChannelUser>>(){})
                .adapt(new ObservableBody<ResponseData<ChannelUser>>());
    }


    public static Observable<ResponseData> guideLike(String roomId) {
        return OkGo.<ResponseData>post(HttpUrl.GUIDE_LIKE+roomId)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());

    }


    public static Observable<ResponseData<CompanyRegisterBean>> businessRegister(String json) {
        return OkGo.<ResponseData<CompanyRegisterBean>>post(HttpUrl.BUSINESS_REGISTER)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<CompanyRegisterBean>>(){})
                .adapt(new ObservableBody<ResponseData<CompanyRegisterBean>>());

    }

    public static Observable<ResponseData> personalRegister(String json) {
        return OkGo.<ResponseData>post(HttpUrl.PERSONAL_REGISTER)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());

    }

    public static Observable<ResponseData> wechatRegister(String json) {
        return OkGo.<ResponseData>post(HttpUrl.WECHAT_REGISTER)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());

    }


    public static Observable<ResponseData<FileBean>> uploadLicense(File file) {
        return OkGo.<ResponseData<FileBean>>post(HttpUrl.UPLOAD_LICENSE)
                .params("file", file)
                .converter(new JsonConvert<ResponseData<FileBean>>(){})
                .adapt(new ObservableBody<ResponseData<FileBean>>());
    }

    public static Observable<ResponseData<LoginBean>> login(String json) {
        return OkGo.<ResponseData<LoginBean>>post(HttpUrl.LOGIN)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<LoginBean>>(){})
                .adapt(new ObservableBody<ResponseData<LoginBean>>());
    }

    public static Observable<ResponseData<LoginBean>> wechatLogin(String json) {
        return OkGo.<ResponseData<LoginBean>>post(HttpUrl.WECHAT_LOGIN)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<LoginBean>>(){})
                .adapt(new ObservableBody<ResponseData<LoginBean>>());
    }

    public static Observable<ResponseData<List<CompanyBean>>> queryCompany(String str) {
        return OkGo.<ResponseData<List<CompanyBean>>>post(HttpUrl.QUERY_COMPANY+str)
                .converter(new JsonConvert<ResponseData<List<CompanyBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<CompanyBean>>>());
    }

    public static Observable<ResponseData<StaffManageBean>> staffManage(String json) {
        return OkGo.<ResponseData<StaffManageBean>>post(HttpUrl.STAFF_MANAGE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<StaffManageBean>>(){})
                .adapt(new ObservableBody<ResponseData<StaffManageBean>>());
    }

    public static Observable<ResponseData<CollectionBean>> collectionList(String json) {
        return OkGo.<ResponseData<CollectionBean>>post(HttpUrl.COLLECTION_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<CollectionBean>>(){})
                .adapt(new ObservableBody<ResponseData<CollectionBean>>());
    }

    public static Observable<ResponseData> createCollection(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CREATE_COLLECTION)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }
    public static Observable<ResponseData<SquareListBean>> getSquareList(String json) {
        return OkGo.<ResponseData<SquareListBean>>post(HttpUrl.GET_SQUARE_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<SquareListBean>>(){})
                .adapt(new ObservableBody<ResponseData<SquareListBean>>());
    }


    public static Observable<ResponseData> addStaff(String json) {
        return OkGo.<ResponseData>post(HttpUrl.ADD_STAFF)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }


    public static Observable<ResponseData<RepairRecordBean>> repairRecord(String json) {
        return OkGo.<ResponseData<RepairRecordBean>>post(HttpUrl.REPAIR_RECORD_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<RepairRecordBean>>(){})
                .adapt(new ObservableBody<ResponseData<RepairRecordBean>>());
    }

    public static Observable<ResponseData<VideoListBean>> shareList(String json) {
        return OkGo.<ResponseData<VideoListBean>>post(HttpUrl.SHARE_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<VideoListBean>>(){})
                .adapt(new ObservableBody<ResponseData<VideoListBean>>());
    }

    public static Observable<ResponseData> createShare(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CREATE_SHARE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> setLike(String json) {
        return OkGo.<ResponseData>post(HttpUrl.SET_LIKE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<String>> getCode(String json) {
        return OkGo.<ResponseData<String>>post(HttpUrl.GET_CODE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<String>>(){})
                .adapt(new ObservableBody<ResponseData<String>>());
    }

    public static Observable<ResponseData<List<ContactsBean>>> contactsList(String json) {
        return OkGo.<ResponseData<List<ContactsBean>>>post(HttpUrl.CONTACTS_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<List<ContactsBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<ContactsBean>>>());
    }

    public static Observable<ResponseData> addContacts(String json) {
        return OkGo.<ResponseData>post(HttpUrl.ADD_CONTACTS)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<List<ContactsNewsBean>>> contactsRequest(String json) {
        return OkGo.<ResponseData<List<ContactsNewsBean>>>post(HttpUrl.CONTACTS_REQUEST_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<List<ContactsNewsBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<ContactsNewsBean>>>());
    }

    public static Observable<ResponseData> updateFriendStatus(String json) {
        return OkGo.<ResponseData>post(HttpUrl.UPDATE_FRIEND_STATUS)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<UserControlBean>> userControl() {
        return OkGo.<ResponseData<UserControlBean>>post(HttpUrl.USER_CONTROLLER)
                .converter(new JsonConvert<ResponseData<UserControlBean>>(){})
                .adapt(new ObservableBody<ResponseData<UserControlBean>>());
    }

    public static Observable<ResponseData> staffReview(String json) {
        return OkGo.<ResponseData>post(HttpUrl.STAFF_REVIEW)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> updatePassword(String json) {
        return OkGo.<ResponseData>post(HttpUrl.UPDATE_PASSWORD)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<ExpertBean>> getBusinessExpert(String json) {
        return OkGo.<ResponseData<ExpertBean>>post(HttpUrl.BUSINESS_EXPERT)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<ExpertBean>>(){})
                .adapt(new ObservableBody<ResponseData<ExpertBean>>());
    }

    public static Observable<ResponseData<ExpertBean>> getPersonalExpert(String json) {
        return OkGo.<ResponseData<ExpertBean>>post(HttpUrl.PERSONAL_EXPERT)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<ExpertBean>>(){})
                .adapt(new ObservableBody<ResponseData<ExpertBean>>());
    }

    public static Observable<ResponseData> startRecording(String json) {
        return OkGo.<ResponseData>post(HttpUrl.START_RECORDING)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> stopRecording(String json) {
        return OkGo.<ResponseData>post(HttpUrl.STOP_RECORDING)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<List<VideotapeBean>>> videoRecordList() {
        return OkGo.<ResponseData<List<VideotapeBean>>>post(HttpUrl.VIDEO_RECORDING_LIST)
                .converter(new JsonConvert<ResponseData<List<VideotapeBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<VideotapeBean>>>());
    }

    public static Observable<ResponseData> callFailed(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CALL_FAILED)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> sendVideo(String json) {
        return OkGo.<ResponseData>post(HttpUrl.SEND_VIDEO)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> forgetPassword(String json) {
        return OkGo.<ResponseData>post(HttpUrl.FORGET_PASSWORD)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<Integer>> getMessageNum() {
        return OkGo.<ResponseData<Integer>>post(HttpUrl.GET_MESSGE_NUM)
                .converter(new JsonConvert<ResponseData<Integer>>(){})
                .adapt(new ObservableBody<ResponseData<Integer>>());
    }

    public static Observable<ResponseData> cancelShare(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CANCEL_SHARE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> cancelCollection(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CANCEL_COLLECTION)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }


    public static Observable<ResponseData<SendRecordBean>> sendVideoRecord(String json) {
        return OkGo.<ResponseData<SendRecordBean>>post(HttpUrl.SEND_VIDEO_RECORD)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<SendRecordBean>>(){})
                .adapt(new ObservableBody<ResponseData<SendRecordBean>>());
    }

    public static Observable<ResponseData<DepartmentBean>> departmentList(String json) {
        return OkGo.<ResponseData<DepartmentBean>>post(HttpUrl.DEPARTMENT_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<DepartmentBean>>(){})
                .adapt(new ObservableBody<ResponseData<DepartmentBean>>());
    }

    public static Observable<ResponseData> addDepartment(String json) {
        return OkGo.<ResponseData>post(HttpUrl.ADD_DEPARTMENT)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> updateDepartment(String json) {
        return OkGo.<ResponseData>post(HttpUrl.UPDATE_DEPARTMENT)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> delDepartment(String json) {
        return OkGo.<ResponseData>post(HttpUrl.DEL_DEPARTMENT)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<List<VideoCategory>>> getVideoCategory() {
        return OkGo.<ResponseData<List<VideoCategory>>>post(HttpUrl.GET_VIDEO_CATEGORY)
                .converter(new JsonConvert<ResponseData<List<VideoCategory>>>(){})
                .adapt(new ObservableBody<ResponseData<List<VideoCategory>>>());
    }

    public static Observable<ResponseData<ShareVideoBean>> adminShareList(String json) {
        return OkGo.<ResponseData<ShareVideoBean>>post(HttpUrl.ADMIN_SHARE_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<ShareVideoBean>>(){})
                .adapt(new ObservableBody<ResponseData<ShareVideoBean>>());
    }

    public static Observable<ResponseData<RepairRecordBean>> adminRepairRecord(String json) {
        return OkGo.<ResponseData<RepairRecordBean>>post(HttpUrl.ADMIN_MAINTAIN_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<RepairRecordBean>>(){})
                .adapt(new ObservableBody<ResponseData<RepairRecordBean>>());
    }

    public static Observable<ResponseData<LoginBean>> guestLogin() {
        return OkGo.<ResponseData<LoginBean>>post(HttpUrl.GUEST_LOGIN)
                .converter(new JsonConvert<ResponseData<LoginBean>>(){})
                .adapt(new ObservableBody<ResponseData<LoginBean>>());
    }

    public static Observable<ResponseData> userLike(String json) {
        return OkGo.<ResponseData>post(HttpUrl.USER_LIKE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> cancelUserLike(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CANCEL_USER_LIKE)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> follow(String json) {
        return OkGo.<ResponseData>post(HttpUrl.USER_FOLLOW)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData> cancelFollow(String json) {
        return OkGo.<ResponseData>post(HttpUrl.CANCEL_FOLLOW)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<ExpertDetailBean>> getExpertDetails(String json) {
        return OkGo.<ResponseData<ExpertDetailBean>>post(HttpUrl.GET_EXPERT_DETAILS)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<ExpertDetailBean>>(){})
                .adapt(new ObservableBody<ResponseData<ExpertDetailBean>>());
    }

    public static Observable<ResponseData<ExpertDetailBean>> getUserDetail(String json) {
        return OkGo.<ResponseData<ExpertDetailBean>>post(HttpUrl.GET_FACTORY_DETAILS)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<ExpertDetailBean>>(){})
                .adapt(new ObservableBody<ResponseData<ExpertDetailBean>>());
    }

    public static Observable<ResponseData<List<FollowListBean>>> getFollowList() {
        return OkGo.<ResponseData<List<FollowListBean>>>post(HttpUrl.FOLLOW_LIST)
                .converter(new JsonConvert<ResponseData<List<FollowListBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<FollowListBean>>>());
    }

    public static Observable<ResponseData<List<MajorBean>>> getMajor() {
        return OkGo.<ResponseData<List<MajorBean>>>post(HttpUrl.GET_MAJOR)
                .converter(new JsonConvert<ResponseData<List<MajorBean>>>(){})
                .adapt(new ObservableBody<ResponseData<List<MajorBean>>>());
    }

    public static Observable<ResponseData> addVideo(String json) {
        return OkGo.<ResponseData>post(HttpUrl.ADD_VIDEO)
                .upJson(json)
                .converter(new JsonConvert<ResponseData>(){})
                .adapt(new ObservableBody<ResponseData>());
    }

    public static Observable<ResponseData<MyVideoBean>> myVideoList(String json) {
        return OkGo.<ResponseData<MyVideoBean>>post(HttpUrl.GET_MY_VIDEO_LIST)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<MyVideoBean>>(){})
                .adapt(new ObservableBody<ResponseData<MyVideoBean>>());
    }

    public static Observable<ResponseData<CollectionBean>> learnVideo(String json) {
        return OkGo.<ResponseData<CollectionBean>>post(HttpUrl.GET_LEARN_VIDEO)
                .upJson(json)
                .converter(new JsonConvert<ResponseData<CollectionBean>>(){})
                .adapt(new ObservableBody<ResponseData<CollectionBean>>());
    }

}

